<?php
namespace app\user\controller;

use tp5_lib\user\logic\UserModule;

/**
 * 移动端的用户中心
 */
class MobileController extends IndexController
{
    public function index()
    {
        echo "<pre>@todo show sth. different</pre>";
        $this->assign("user",$this->user);
        if(!$this->request->isMobile()){
            $this->redirect("index/index");
        }
        $module=new UserModule();
        if(!$config=$module->read("user")){
            $menu=[];
        }
        $menu=$config["menu"];
        $this->assign("menu",$menu);
        return $this->fetch("index/mobile/index");
    }
}
